import { defHttp } from '@/utils/http/axios';

const baseUrl = '/serviceRecord';

enum Api {
  create = `${baseUrl}/createServiceRecord`, //创建
  delete = `${baseUrl}/deleteServiceRecord`, //删除
  getId = `${baseUrl}/getServiceRecordById`, //根据id获取
  search = `${baseUrl}/searchServiceRecord`, //获取列表
  update = `${baseUrl}/updateServiceRecord`, //修改
  // 办结
  completion = `${baseUrl}/completion`,
}

//
export const getServiceCreate = (params?: Recordable) => defHttp.post({ url: Api.create, params });
export const getServiceDelete = (params?: Recordable) => defHttp.post({ url: Api.delete, params });
export const getServiceGetId = (params?: Recordable) => defHttp.post({ url: Api.getId, params });
export const getServiceSearch = (params?: Recordable) => defHttp.post({ url: Api.search, params });
export const getServiceUpdate = (params?: Recordable) => defHttp.post({ url: Api.update, params });
// 办结
export const handleCompletion = (params?: Recordable) =>
  defHttp.post({ url: Api.completion, params });
